package edu.sctu.zhangwang.month201506.day20150626.chapter4.shape.shape3D;

/**
 * Created by Administrator on 2015/6/26.
 */
public class Sqhere implements Shape3D {
    private int r;
    public int getarea;
    public int getvolnme;
    @Override
    public void area() {
        getarea = 4*(int)Math.PI*this.r*this.r;
    }

    @Override
    public void volnme() {
        getvolnme = (4/3)*(int)Math.PI*r*r*r;
    }

    public void getArea(){
        area();
        System.out.println("球的表面积为："+getarea);
    }
    public void getVolnme(){
        volnme();
        System.out.println("球的体积为："+getvolnme);
    }

    public int getR() {
        return r;
    }

    public void setR(int r) {
        this.r = r;
    }

}
